package com.example.demo.entity;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 评论实体
 * 
 * @author wang
 *
 */
@Data
@Accessors(chain=true)
public class BookComment {

	@JsonInclude(value = Include.NON_NULL)
	private Integer id;
	
	@JsonInclude(value = Include.NON_NULL)
	private Integer commentId;
	
	@JsonInclude(value = Include.NON_NULL)
	private Integer bookId;

	/**
	 * 评论内容
	 */
	private String content;

	/**
	 * 评论时间
	 */
	@JsonInclude(value = Include.NON_NULL)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	/**
	 * 评论者id
	 */
	private int user_Id;
	/**
	 * 评论者id
	 */
	private Integer userId;
	/**
	 * 书的id
	 */
	private int book_core_id;
	/**
	 * 书的评分
	 */
	private Float grade;
	/**
	 * 0,评论,大于1,回复的评论id
	 */
	private int type;
	/**
	 * 回复目的人id(若是平论,则id为0)
	 */
	private int reguseId;
	/**
	 * 回复集合
	 */
	@JsonInclude(value = Include.NON_NULL)
	private List<BookComment> bookReplyCommentList;
	/**
	 * 获取评论总数
	 */
	@JsonInclude(value = Include.NON_NULL)
	private BookAssist bookAssistOne;
	/**
	 * 统计每条评论下的点赞数量
	 */
	@JsonInclude(value = Include.NON_NULL)
	private List<BookAssist> bookAssistOneList;
	/**
	 * 评论下的点赞数量
	 */
	@JsonInclude(value = Include.NON_NULL)
	private Integer bookAssistAccount;
	/**
	 * 判断当前用户是否点过赞
	 */
	@JsonInclude(value = Include.NON_NULL)
	private Boolean tagsOrNot;
	
}
